from django.db import models
from django.utils.translation import ugettext_lazy as _
from pagemagic.models import AbstractMenuItemAttrs, AbstractPageAttrs
from pagemagic.utils.i18n import multilingual_field

class MultilingualMenuItemAttrs(AbstractMenuItemAttrs):
    title_ru = models.CharField(_('menu item title (RU)'), max_length=255)
    title_en = models.CharField(_('menu item title (EN)'), max_length=255)
    title = multilingual_field(ru='title_ru', en='title_en')

class MultilingualPageAttrs(AbstractPageAttrs):
    text_ru = models.TextField(_('text (RU)'))
    text_en = models.TextField(_('text (EN)'))
    text = multilingual_field(ru='text_ru', en='text_en')

